﻿
//班组月度生产信息统计(柱状图) 
function GetProductionStatisticsInfo() {
    $.ajax({
        contentType: "application/x-www-form-urlencoded",
        type: "GET",
        url: "KanbanHandler.ashx?type=ProductionStatistics&teamid=" + jQuery.trim($("#teamid").val()) + "&month=" + $('#searchYear').val() + '-' + $('#searchMonth').val(),
        dataType: "text",
        success: function (data) {
            if (data != "") {
                $('#Div1 h1').text('班组月度生产信息统计');
                var obj = JSON.parse(data);
                var arrPutIn = [], // 投入
                    arrPutOut = [], // 产出
                    arrmonths = []; // 月份
                for (var i = 0; i < obj.arr.length; i++) {
                    arrPutIn.push(obj.arr[i]["putin"]);
                    arrPutOut.push(obj.arr[i]["putout"]);
                    arrmonths.push(obj.arr[i]["months"]);
                };
                echarts.dispose(document.getElementById("ProductionStatistics"));
                var myChart = echarts.init(document.getElementById('ProductionStatistics'));
                var option = {
                    color: ['#0099bc', '#02b564', '#58afed', '#6dd8da', '#48c6ec', '#50ffb2', '#FFA500', '#F0E68C', '#E9967A', '#F3D7B5', '#7f83b0', '#b6a2de',
                        '#9ACD32', '#98FB98', '#DB7093', '#FFC0CB', '#16b9c6', '#00d9f6'],
                    title: {
                        text: '',
                        subtext: ''
                    },
                    tooltip: {
                        trigger: 'axis',
                        show: false
                    },
                    legend: {
                        data: ['零件投入数', '零件产出数'],
                        type: 'plain',
                        textStyle: {
                            fontSize: '16',
                            fontWeight: 'bold',
                            color: '#ccc'
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            name: '月份',
                            type: 'category',
                            data: arrmonths,
                            // x轴的字体样式
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    //x轴坐标轴颜色
                            },
                            axisTick: {
                                lineStyle: { color: '#ccc' }    //x轴刻度的颜色
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            // y轴的字体样式
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    //y轴坐标轴颜色
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                interval: 1,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636 '
                                }
                            },

                            axisTick: {
                                lineStyle: { color: '#ccc' }    //y轴刻度的颜色
                            }
                        }
                    ],
                    series: [
                        {
                            name: '零件投入数',
                            type: 'bar',
                            data: arrPutIn,
                            label: {
                                show: true,
                                position: 'top',
                                color: '#ccc'
                            }
                        },
                        {
                            name: '零件产出数',
                            type: 'bar',
                            data: arrPutOut,
                            label: {
                                show: true,
                                position: 'top',
                                color: '#ccc'
                            }
                        }
                    ]
                };
                myChart.setOption(option);
            }
        }
    });
};
//班组合格率统计(折线图)
function GetQualRateStatistics() {
    $.ajax({
        contentType: "application/x-www-form-urlencoded",
        type: "GET",
        url: "KanbanHandler.ashx?type=QualRateStatistics&teamid=" + jQuery.trim($("#teamid").val()) + "&month=" + $('#searchYear').val() + '-' + $('#searchMonth').val(),
        dataType: "text",
        success: function (data) {
            if (data != "") {
                $('#Div4 h1').text($('#searchYear').val() + '-' + $('#searchMonth').val() + '班组合格率统计');
                var obj = JSON.parse(data);
                var arrTeamName = [], //班组
                    arrHegelv = []; //合格率
                for (var i = 0; i < obj.arr.length; i++) {
                    arrTeamName.push(obj.arr[i]["teamname"]);
                    arrHegelv.push(obj.arr[i]["hegelv"]);
                };
                echarts.dispose(document.getElementById("QualRateStatistics"));
                var myChart = echarts.init(document.getElementById('QualRateStatistics'));
                //指定图表的配置项和数据
                //var formatter = '{b0}';//展示百分比
                //var j = 0;
                //for (var k = 0; k < 1; k++) {//折线数不确定
                //    formatter += '<br/>{a' + j + '}: {c' + j + '}%';
                //    j++;
                //}
                var formatter1 = '';//展示百分比
                var j = 0;
                for (var k = 0; k < 1; k++) {//折线数不确定
                    formatter1 += '{c' + j + '}%';
                    j++;
                }
                console.log(echarts.version);
                var option = {
                    //标题
                    title: {
                        text: ''
                    },
                    tooltip: {
                        trigger: 'axis',
                        show: false,
                        axisPointer: {
                            type: 'line'
                        },
                        position: function (point, params, dom) {
                            return [point[0], '10%'];
                        }

                    },
                    //图例-每一条数据的名字叫销量
                    legend: {
                        data: ['合格率'],
                        textStyle: {
                            fontSize: '16',
                            fontWeight: 'bold',
                            color: '#ccc'
                        }
                    },
                    //x轴
                    xAxis: {
                        name: '班组',
                        data: arrTeamName,
                        type: 'category',
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: '#ccc'
                            }
                        },
                        // x轴的字体样式
                        axisLabel: {
                            show: true,
                            textStyle: {
                                color: '#ccc',
                                fontSize: '16'
                            }
                        },
                        textStyle: {
                            color: '#ccc',
                            fontSize: '16'
                        },
                        axisTick: {//决定是否显示坐标刻度  
                            alignWithLabel: true,
                            show: true
                        },
                        // 控制网格线是否显示
                        splitLine: {
                            show: true,
                            //  改变轴线颜色
                            lineStyle: {
                                type: 'dashed',
                                // 使用深浅的间隔色
                                color: '#363636'
                            }
                        }
                    },
                    //y轴没有显式设置，根据值自动生成y轴
                    yAxis: {
                        show: true,
                        type: 'value',
                        textStyle: {
                            color: '#ccc',
                            fontSize: '16'
                        },
                        axisLine: {
                            lineStyle: {
                                color: '#ccc'
                            }
                        },
                        axisLabel: {
                            show: true,
                            interval: 'auto',
                            fontSize: '16',
                            formatter: '{value} %'//纵坐标百分比
                        },
                        // 控制网格线是否显示
                        splitLine: {
                            show: true,
                            //  改变轴线颜色
                            lineStyle: {
                                type: 'dashed',
                                // 使用深浅的间隔色
                                color: '#363636'
                            }
                        }
                    },
                    //数据-data是最终要显示的数据
                    series: [{
                        name: '合格率',
                        type: 'line',
                        data: arrHegelv,
                        label: {
                            show: true,
                            position: 'top',
                            formatter: formatter1,
                            fontSize: '16',
                            color: '#ccc'
                        },
                        lineStyle: {
                            width: 2
                        }
                    },
                    {
                        name: '合格率',
                        type: 'bar',
                        data: arrHegelv,
                        barWidth: 2,
                        label: {
                            show: false,
                            position: 'top',
                            formatter: formatter1,
                            fontSize: '16',
                            color: '#fff'
                        },
                        itemStyle: {
                            normal: {
                                //颜色设置
                                color: function (params) {
                                    // 渐变色 设置
                                    var color1 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red" // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red" // 100% 处的颜色
                                    }], false)
                                    var color2 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)
                                    var color3 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)
                                    var color4 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)
                                    var color5 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)
                                    var color6 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)
                                    var color7 = new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: "Red"  // 0% 处的颜色
                                    }, {
                                        offset: 1,
                                        color: "Red"  // 100% 处的颜色
                                    }], false)

                                    var colorList = [
                                        color1, color1, color1, color1, color1, color1, color1
                                    ];
                                    return colorList[params.dataIndex]
                                }
                            }
                        }
                    }]
                };
                //使用刚刚指定的配置项和数据项显示图表
                myChart.setOption(option);
            }
        }
    });
};
//班组任务完成率
function GetFinishRateStatistics() {
    $.ajax({
        contentType: "application/x-www-form-urlencoded",
        type: "GET",
        url: "KanbanHandler.ashx?type=FinishRateStatistics&teamid=" + jQuery.trim($("#teamid").val()) + "&month=" + $('#searchYear').val() + '-' + $('#searchMonth').val(),
        dataType: "text",
        success: function (data) {
            if (data != "") {
                $('#Div3 h1').text($('#searchYear').val() + '-' + $('#searchMonth').val() + '班组任务完成率');
                var obj = JSON.parse(data);
                var arrTeamName = [], // 班组
                    arrFinishlv = []; // 完成率
                for (var i = 0; i < obj.arr.length; i++) {
                    arrTeamName.push(obj.arr[i]["teamname"]);
                    arrFinishlv.push(obj.arr[i]["finishRate"]);
                };
                echarts.dispose(document.getElementById("FinishRateStatistics"));
                var myChart = echarts.init(document.getElementById('FinishRateStatistics'));
                //指定图表的配置项和数据
                //var formatter = '{b0}';//展示百分比
                //var j = 0;
                //for (var k = 0; k < 1; k++) {//折线数不确定  假设有五条
                //    formatter += '<br/>{a' + j + '}: {c' + j + '}%';
                //    j++;
                //}
                var formatter1 = '';//展示百分比
                var j = 0;
                for (var k = 0; k < 1; k++) {//折线数不确定
                    formatter1 += '{c' + j + '}%';
                    j++;
                }
                var option = {
                    color: ['rgb(230,207,13)', 'rgb(237,181,34)', 'rgb(0,153,188)', '#20B2AA', 'rgb(31,246,255)', 'rgb(64,212,214)', 'rgb(190,172,232)', 'rgb(92,177,232)', 'rgb(71,181,131)', 'rgb(237,181,34)', 'rgb(2,181,100)', 'rgb(91,157,218)', 'rgb(2,181,100)', '#58afed'],
                    title: {
                        text: '',
                        subtext: ''
                    },
                    tooltip: {
                        trigger: 'axis',
                        formatter: formatter1 //展示百分比
                    },
                    tooltip: {
                        trigger: 'axis',
                        show: false,
                        formatter: "{a} <br/>{b} : {c}%"
                    },
                    legend: {
                        data: ['完成率'],
                        type: 'plain',
                        textStyle: {
                            fontSize: '16',
                            fontWeight: 'bold',
                            color: '#ccc'
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            name: '班组',
                            type: 'category',
                            data: arrTeamName,
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    // x轴坐标轴颜色
                            },
                            axisTick: {
                                lineStyle: { color: '#ccc' }    // x轴刻度的颜色
                            }
                        }
                    ],
                    yAxis: {
                        show: true,
                        type: 'value',
                        axisLabel: {
                            show: true,
                            interval: 'auto',
                            formatter: '{value} %',//纵坐标百分比
                            textStyle: {
                                color: '#ccc',
                                fontSize: '16'
                            }
                        },
                        axisLine: {
                            lineStyle: { color: '#ccc' }    // y轴坐标轴颜色
                        },
                        // 控制网格线是否显示
                        splitLine: {
                            show: true,
                            //  改变轴线颜色
                            lineStyle: {
                                type: 'dashed',
                                // 使用深浅的间隔色
                                color: '#363636'
                            }
                        },
                        axisTick: {

                            show: false,
                            lineStyle: { color: '#ccc' }    // y轴刻度的颜色
                        }
                    },
                    series: [{
                        name: '完成率',
                        type: 'bar',
                        data: arrFinishlv,
                        barWidth: 50,
                        label: {
                            show: true,
                            position: 'top',
                            formatter: formatter1,
                            fontSize: '16',
                            color: '#ccc'
                        }
                    }]
                };
                myChart.setOption(option);
            }
        }
    });
};
//质量缺陷分析（饼图）
function GetQualDefectionAnalysis() {
    var problemData = [];
    $.ajax({
        contentType: "application/x-www-form-urlencoded",
        type: "POST",
        url: "KanbanHandler.ashx?type=QualDefectionAnalysis&teamid=" + jQuery.trim($("#teamid").val()) + "&month=" + $('#searchYear').val() + '-' + $('#searchMonth').val(),
        dataType: "text",
        success: function (data) {
            if (data != "") {
                $('#Div2 h1').text($('#searchYear').val() + '-' + $('#searchMonth').val() + '质量缺陷分析');
                var obj = JSON.parse(data);
                var strHTML = "";
                var arrRejectName = [], //不良原因
                    arrPercent = [], //占比
                    arrAccumulatedPercent = [], //累计占比占比
                    arrQty = []; //数量
                var color1 = "background-color:rgb(171,184,227);color:black ";
                var color2 = "background-color:rgb(189,215,238);color:black ";
                var maxValue = 0;
                for (var i = 0; i < obj.arr.length; i++) {
                    maxValue += parseInt(obj.arr[i]["qty"]);
                }
                for (var i = 0; i < obj.arr.length; i++) {
                    arrRejectName.push(obj.arr[i]["rejectreasonname"]);
                    arrAccumulatedPercent.push(obj.arr[i]["accumulatedpercent"]);
                    arrQty.push(obj.arr[i]["qty"]);
                    arrPercent.push({
                        //通过把result进行遍历循环来获取数据并放入Echarts中
                        name: obj.arr[i]["rejectreasonname"] + ":" + obj.arr[i]["qty"] + "",
                        value: obj.arr[i]["percent"]
                    });
                    if (i % 2 == 0) {
                        strHTML += "<tr style='height: 50px;" + color1 + " '>";
                    }
                    else {
                        strHTML += "<tr style='height: 50px;" + color2 + " '>";
                    }
                    //不良原因
                    if (obj.arr[i]["rejectreasonname"] !== null) {
                        strHTML += "<td>" + obj.arr[i]["rejectreasonname"] + "</td>";
                    } else {
                        strHTML += "<td>&nbsp;</td>";
                    }
                    //数量
                    if (obj.arr[i]["qty"] !== null) {
                        strHTML += "<td>" + obj.arr[i]["qty"] + "</td>";
                    } else {
                        strHTML += "<td>&nbsp;</td>";
                    }
                    //占比
                    if (obj.arr[i]["percent"] !== null) {
                        strHTML += "<td>" + obj.arr[i]["percent"] + "%</td>";
                    } else {
                        strHTML += "<td>&nbsp;</td>";
                    }
                    strHTML += "</tr>";
                };
                $("#aj_data").html(strHTML);
                var formatter1 = '';//展示百分比
                var j = 0;
                for (var k = 0; k < 1; k++) {//折线数不确定
                    formatter1 += '{c' + j + '}%';
                    j++;
                }
                echarts.dispose(document.getElementById("QualDefectionAnalysis"));
                var myChart = echarts.init(document.getElementById('QualDefectionAnalysis'));
                var option = {
                    color: ['rgb(0,153,188)', 'rgb(33,126,168)', '#3CB371', '#BC8F8F', '#EEEED1', '#E0EEE0', 'rgb(141,153,179)', 'rgb(61,204,208)', 'rgb(182,162,223)', 'rgb(92,177,242)', 'rgb(255,184,128)', 'rgb(230,207,13)',
                            'rgb(238,134,141)', 'rgb(242,161,18)', 'rgb(97,160,168)', 'rgb(194,53,49)', 'rgb(91,155,213)', 'rgb(68,114,196)'],
                    tooltip: {
                        trigger: 'axis',
                        show: false,
                        axisPointer: {
                            type: 'cross',
                            crossStyle: {
                                color: '#999'
                            }
                        }
                    },
                    legend: {
                        data: ['不合格数量', '累计占比'],
                        type: 'plain',
                        textStyle: {
                            fontSize: '17',
                            fontWeight: 'bold',
                            color: '#ccc'
                        }
                    },
                    xAxis: [
                        {
                            name: '缺陷',
                            type: 'category',
                            data: arrRejectName,
                            axisPointer: {
                                type: 'shadow'
                            },
                            axisLabel: {
                                show: true,
                                interval: 'auto',
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    //x轴坐标轴颜色
                            }
                        }
                    ],
                    yAxis: [{
                        type: 'value',
                        name: '',
                        min: 0,
                        max: maxValue,
                        axisLabel: {
                            show: true,
                            interval: 'auto',
                            formatter: '{value} ',//纵坐标百分比
                            textStyle: {
                                color: '#ccc',
                                fontSize: '16'
                            }
                        },
                        //控制网格线是否显示
                        splitLine: {
                            show: true,
                            //  改变轴线颜色
                            lineStyle: {
                                type: 'dashed',
                                // 使用深浅的间隔色
                                color: '#363636'
                            }
                        },
                        axisLine: {
                            lineStyle: { color: '#ccc' }    //x轴坐标轴颜色
                        }
                    }, {
                        type: 'value',
                        name: '',
                        axisLabel: {
                            show: true,
                            interval: 'auto',
                            formatter: '{value}% ',//纵坐标百分比
                            textStyle: {
                                color: '#ccc',
                                fontSize: '16'
                            }
                        },
                        //控制网格线是否显示
                        splitLine: {
                            show: true,
                            //  改变轴线颜色
                            lineStyle: {
                                type: 'dashed',
                                // 使用深浅的间隔色
                                color: '#363636'
                            }
                        }
                    }],
                    series: [{
                        name: '不合格数量',
                        type: 'bar',
                        barWidth: 50,
                        data: arrQty,
                        label: {
                            show: true,
                            position: 'top',
                            fontSize: '16',
                            color: '#ccc'
                        }
                    },
                        {
                            name: '累计占比',
                            type: 'line',
                            smooth: 0.5,
                            yAxisIndex: 1,
                            label: {
                                show: true,
                                formatter: formatter1,
                                position: 'top',
                                fontSize: '16',
                                color: '#ccc'
                            },
                            lineStyle: {
                                width: 2
                            },
                            data: arrAccumulatedPercent
                        }
                    ]
                };
                myChart.setOption(option);
                echarts.dispose(document.getElementById("QualDefectionAnalysis1"));
                //饼图显示
                var myChart1 = echarts.init(document.getElementById('QualDefectionAnalysis1'));
                var option1 = {
                    color: ['rgb(230,207,13)', 'rgb(141,153,179)', 'rgb(61,204,208)', 'rgb(182,162,223)', 'rgb(92,177,242)', 'rgb(255,184,128)',
                            'rgb(238,134,141)', 'rgb(242,161,18)', 'rgb(97,160,168)', 'rgb(194,53,49)', 'rgb(91,155,213)', 'rgb(68,114,196)'],
                    title: {
                        text: '',
                        subtext: '',
                        x: 'center'
                    },
                    legend: {
                        orient: 'vertical',
                        show: false,
                        textStyle: {
                            fontSize: '16',
                            fontWeight: 'bold',
                            color: '#ccc'
                        },
                        left: 80,
                        top: 30,
                        bottom: 20

                    },
                    tooltip: {
                        trigger: 'item',
                        show: false,
                        formatter: "{a} <br/>{b} : {c} ({d}%)"
                    },
                    series: [
                        {
                            type: 'pie',
                            radius: [0, '20%'],
                            color: ['#0e3858'],
                            label: {
                                normal: {
                                    position: 'center',
                                    color: '#ccc',
                                    fontSize: 16
                                }
                            },
                            labelLine: {
                                normal: {
                                    show: false
                                }
                            },
                            hoverAnimation: false,
                            tooltip: {
                                show: false
                            },
                            data: [
                                { value: 0, name: '质量缺陷占比' }
                            ]
                        },
                        {
                            type: 'pie',
                            zlevel: -1,
                            radius: [0, '40%'],
                            color: ['#0c2130'],
                            label: {
                                normal: {
                                    position: 'center',
                                    color: '#ffffff',
                                    fontSize: 14
                                }
                            },
                            labelLine: {
                                normal: {
                                    show: false
                                }
                            },
                            hoverAnimation: false,
                            tooltip: {
                                show: false
                            },
                            data: [
                                { value: 0, name: '0' }
                            ]
                        },
                        {
                            name: '',
                            type: 'pie',
                            radius: ['30%', '40%'],
                            label: {
                                normal: {
                                    formatter: ' {b}\n 占比:{d}%',
                                    fontSize: 16
                                }
                            },
                            data: arrPercent
                        }
                    ]
                };
                myChart1.setOption(option1);
            }
        }
    });
};
//班组工时统计
function GetWorkReport() {
    $.ajax({
        contentType: "application/x-www-form-urlencoded",
        type: "GET",
        url: "KanbanHandler.ashx?type=GetWorkReport&teamid=" + jQuery.trim($("#teamid").val()) + "&month=" + $('#searchYear').val() + '-' + $('#searchMonth').val(),
        dataType: "text",
        success: function (data) {
            if (data != "") {
                $('#Div5 h1').text('班组工时统计');
                var obj = JSON.parse(data);
                var arrWorkReport = [], //工时
                    arrTeam = []; //班组
                for (var i = 0; i < obj.arr.length; i++) {
                    arrWorkReport.push(obj.arr[i]["REPORTHOURS"]);
                    arrTeam.push(obj.arr[i]["TEAMNAME"]);
                };
                echarts.dispose(document.getElementById("WorkReport"));
                var myChart = echarts.init(document.getElementById('WorkReport'));
                var option = {
                    color: ['#0099bc', '#02b564', '#58afed', '#6dd8da', '#48c6ec', '#50ffb2', '#FFA500', '#F0E68C', '#E9967A', '#F3D7B5', '#7f83b0', '#b6a2de',
                        '#9ACD32', '#98FB98', '#DB7093', '#FFC0CB', '#16b9c6', '#00d9f6'],
                    title: {
                        text: '',
                        subtext: ''
                    },
                    tooltip: {
                        trigger: 'axis',
                        show: false
                    },
                    legend: {
                        data: ['工时(分钟)'],
                        type: 'plain',
                        textStyle: {
                            fontSize: '16',
                            fontWeight: 'bold',
                            color: '#ccc'
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            name: '班组',
                            type: 'category',
                            data: arrTeam,
                            // x轴的字体样式
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    //x轴坐标轴颜色
                            },
                            axisTick: {
                                lineStyle: { color: '#ccc' }    //x轴刻度的颜色
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            // y轴的字体样式
                            axisLabel: {
                                show: true,
                                textStyle: {
                                    color: '#ccc',
                                    fontSize: '16'
                                }
                            },
                            axisLine: {
                                lineStyle: { color: '#ccc' }    //y轴坐标轴颜色
                            },
                            // 控制网格线是否显示
                            splitLine: {
                                show: true,
                                interval: 1,
                                //  改变轴线颜色
                                lineStyle: {
                                    type: 'dashed',
                                    // 使用深浅的间隔色
                                    color: '#363636 '
                                }
                            },
                            axisTick: {
                                lineStyle: { color: '#ccc' }    //y轴刻度的颜色
                            }
                        }
                    ],
                    series: [
                        {
                            name: '工时(分钟)',
                            type: 'bar',
                            barWidth: '10%',
                            data: arrWorkReport,
                            label: {
                                show: true,
                                position: 'top',
                                color: '#ccc'
                            }
                        }
                    ]
                };
                myChart.setOption(option);
            }
        }
    });
};